<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/2 0002
 * Time: 上午 11:03
 */

namespace App\Http\Controllers\Admin;


use Illuminate\Http\Request;

class TestController extends BaseController
{
    public function index(Request $request){
        if($request->ajax()){
            $input = $request->all();
            $list = service('Test')->testList($input);
            if($list['code'] > 0){
                return $this->error($list['code'],$list['msg']);
            }
            return view('admin.test.indexAjax',['list'=>$list['data']]);
        }else{
            return view('admin.test.index');
        }
    }
}